package com.yww.datastructure.binarytree;

/**
 * @author yww
 * @description 二叉树节点
 * @since 2024/2/8 13:39
 */
public class TreeNode<E> {
    public E val;
    public TreeNode<E> left;
    public TreeNode<E> right;

    public TreeNode(E val, TreeNode<E> left, TreeNode<E> right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return val.toString();
    }
}
